package cn.yr.blog.service.impl;

import cn.yr.blog.mapper.ArticleTagMapper;
import cn.yr.blog.service.ArticleTagService;
import cn.yr.common.core.domain.entity.YrArticleTag;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (YrArticleTag)表服务实现类
 *
 * @author makejava
 * @since 2020-03-13 23:09:04
 */
@Service("articleTagService")
public class ArticleTagServiceImpl extends ServiceImpl<ArticleTagMapper, YrArticleTag> implements ArticleTagService  {
    @Resource
    private ArticleTagMapper articleTagMapper;
    @Override
    public List<Integer> selectArticleIds(List<Integer> tagIds) {
        QueryWrapper<YrArticleTag> objectQueryWrapper = new QueryWrapper<>();
        objectQueryWrapper.in("tag_id",tagIds);
        return articleTagMapper.selectArticleIds(objectQueryWrapper);
    }
}